<div class="wrapper">

    {menu}

    <section class="content">
        <div class="container-fluid">
            <div class="row">
                <div class="col-lg-12">
                    <div class="view-header">
                        <div class="header-title">
                            <h3 class="m-b-xs">All session requests</h3>
                            <small>The session requests page allows you to view, search and delete all of a sessions's requests.
                            </small>
                        </div>
                    </div>
                    <hr>
                </div>
            </div>

            {message}

            <div class="row">

                <div class="col-lg-12">
                    <div class="panel panel-filled">
                        <div class="panel-heading">Information <span id="last" style="float:right">0s ago</span></div>
                        <div class="panel-body">
                            {%if hasRequests}
                            <div class="table-responsive">

                                <table id="simple-table" class="table" style="white-space: nowrap;width:100%;">
                                    <thead>
                                        <tr>
                                            <th>Request ID</th>
                                            <th>Client ID</th>
                                            <th>Browser</th>
                                            <th>IP</th>
                                            <th>URL</th>
                                            <th>Payload</th>
                                            <th>Triggered</th>
                                        </tr>
                                    </thead>
                                    <tbody id="reports-list">
                                        {%foreach request}
                                        <tr>
                                            <td><a href="/manage/persistent/request/{request->id}">{request->id}</a></td>
                                            <td><a href="/manage/persistent/session/{request->clientid}~{request->origin}">{request->clientid}</a></td>
                                            <td>{request->browser}</td>
                                            <td>{request->ip}</td>
                                            <td>{request->shorturi}</td>
                                            <td>{request->payload}</td>
                                            <td data-sort="{request->time}">{request->last}</td>
                                        </tr>
                                        {%/foreach}
                                    </tbody>
                                </table>
                            </div>
                            {%/if}

                            {%!if hasRequests}
                            <p>There are no requests yet for this session.</p>
                            {%/!if}
                        </div>
                    </div>
                </div>
            </div>
        </div>
    </section>

</div>

<!-- Reports JS -->
<script src="/assets/js/dataTables/jquery.dataTables.js"></script>
<script src="/assets/js/dataTables/bootstrap.dataTables.js"></script>
<script src="/assets/js/dataTables/init.js"></script>